package com.maimao.model.goods.vo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.maimao.model.goods.Brand;
import com.maimao.model.goods.GoodsSku;
import lombok.AllArgsConstructor;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;

import java.time.LocalDateTime;
import java.util.List;

/**
 * 商品 列表
 *
 * @author MaoLin Wang
 * @date 2021/1/24 3:56 下午
 */
@Setter
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class GoodsVo {

    @JsonFormat(shape = JsonFormat.Shape.STRING)
    @TableId(type = IdType.ASSIGN_ID)
    private Long id;

    private String name;

    private Brand brand;

    /**
     * 一二三分类名称
     */
    private String category;

    private Integer cid1;
    private Integer cid2;
    private Integer cid3;

    private Integer onSell;

    private Integer status;

    private Integer sellCount;

    private LocalDateTime createTime;

    private LocalDateTime deleteTime;
    /**
     * sku列表
     */
    private List<GoodsSku> goodsSkuList;


    @Override
    public String toString() {
        return "GoodsVo{" +
                "id=" + id +
                ", name='" + name + '\'' +
                ", brand=" + brand +
                ", category='" + category + '\'' +
                ", cid1=" + cid1 +
                ", cid2=" + cid2 +
                ", cid3=" + cid3 +
                ", onSell=" + onSell +
                ", status=" + status +
                ", sellCount=" + sellCount +
                ", createTime=" + createTime +
                ", deleteTime=" + deleteTime +
                ", goodsSkuList=" + goodsSkuList +
                '}';
    }
}
